﻿--新建通告(多个单位可见)
create proc [dbo].[proc_Policy_Create_s]
(
	@Fid int,
	@Title nvarchar(200),
	@Content text,
	@UpName nvarchar(20),
	@IsAll bit,
	@IsDing bit,
	@IsEnd bit,
	@CreateTime datetime,
	@UpTime DATETIME,
	@EndTime Datetime,
	@CompanyId INT,
	@CompanyIdList NVARCHAR(300)
)
as
	--Declare @CompanyId int
	--Set @CompanyId = (select Companyid from aspnet_Users where username=@UpName)
	insert into Policy (Fid,Title,Content,UpName,IsAll,IsDing,IsEnd,CreateTime,UpTime,EndTime,CompanyId,CompanyIdList) values(@Fid,@Title,@Content,@UpName,@IsAll,@IsDing,@IsEnd,@CreateTime,@UpTime,@EndTime,@CompanyId,@CompanyIdList)